import { Router } from 'express';
import { getStudyPlans, getStudyPlan, createStudyPlan, updateStudyPlan, deleteStudyPlan } from '../controllers/studyPlanController';
import { auth } from '../middlewares/auth';

const router = Router();

// 获取学习计划列表
router.get('/', auth, getStudyPlans);

// 获取单个学习计划
router.get('/:id', auth, getStudyPlan);

// 创建学习计划
router.post('/', auth, createStudyPlan);

// 更新学习计划
router.put('/:id', auth, updateStudyPlan);

// 删除学习计划
router.delete('/:id', auth, deleteStudyPlan);

export default router; 